//
//  NSBundle+WSBundle.m
//  WSList
//
//  Created by 朱青 on 2019/6/12.
//

#import "NSBundle+WSBundle.h"
#import "WSListPlaceHolderView.h"

@implementation NSBundle (WSBundle)

+ (instancetype)ws_bundle
{
    static NSBundle *wsBundle = nil;
    if (wsBundle == nil) {
        wsBundle = [NSBundle bundleWithPath:[[NSBundle bundleForClass:[WSListPlaceHolderView class]] pathForResource:@"WSList" ofType:@"bundle"]];
    }
    return wsBundle;
}

+ (UIImage *)ws_nodataImage
{
    static UIImage *nodataImage = nil;
    if (nodataImage == nil) {
        nodataImage = [UIImage imageWithContentsOfFile:[[self ws_bundle] pathForResource:@"data_newPalcehoder_nodata@2x" ofType:@"png"]];
    }
    return nodataImage;
}

+ (UIImage *)ws_failedImage
{
    static UIImage *failedImage = nil;
    if (failedImage == nil) {
        failedImage = [UIImage imageWithContentsOfFile:[[self ws_bundle] pathForResource:@"data_newPalcehoder_datafailed@2x" ofType:@"png"]];
    }
    return failedImage;
}

@end
